import uform.model.core.Schema;
import uform.model.value.Value;

class DemoSchema 
{
	public static function main() 
	{
		var schema = new Schema()
			.add("name", Value.string(3))
			.addOpt("age", Value.int(10));
		
		var ob = { name : "Franco", age : null };
		
		trace(schema.validate(ob));

		ob.age = 3;
		trace(schema.validate(ob));
		
		ob.age = 39;
		trace(schema.validate(ob));
	}
}